export const ROUTE_MAP: { [key: string]: string } = {
    // 设备分组 (Device/)
    'device_info': 'Device/DeviceInfo', // 设备信息
    'device_detail': 'Device/DeviceInfo/DeviceDetail', // 设备详情
    'device_spot': 'Device/DeviceSpot', // 点检任务
    'device_spot_detail': 'Device/DeviceSpot/DeviceSpotDetail', // 点检任务详情
    'device_repair_report': 'Device/DeviceRepairReport', // 设备报修
    'device_repair_report_detail': 'Device/DeviceRepairReport/DeviceRepairReportDetail', // 设备报修详情
    'device_repair': 'Device/DeviceRepair', // 维修任务
    'device_repair_detail': 'Device/DeviceRepair/DeviceRepairDetail', // 维修任务详情
    'device_maintain': 'Device/DeviceMaintain', // 保养任务
    'device_maintain_detail': 'Device/DeviceMaintain/DeviceMaintainDetail', // 保养任务详情
    'device_inspect': 'Device/DeviceInspect', // 巡检任务

    // 质检分组 (Quality/)
    'ipqc': 'Quality/Ipqc', // 扫码过程检
    'ipqc_detail': 'Quality/Ipqc/IpqcDetail', // 扫码过程检详情
    'iqc': 'Quality/Iqc', // 扫码来料检
    'iqc_detail': 'Quality/Iqc/IqcDetail', // 扫码来料检详情
    'oqc': 'Quality/Oqc', // 扫码出库检
    'oqc_detail': 'Quality/Oqc/OqcDetail', // 扫码出库检详情
    'fqc': 'Quality/Fqc', // 扫码成品检
    'fqc_detail': 'Quality/Fqc/FqcDetail', // 扫码成品检详情
    'total_ipqc': 'Quality/TotalIpqc', // 总数过程检
    'total_ipqc_detail': 'Quality/TotalIpqc/TotalIpqcDetail', // 总数过程检详情
    'total_iqc': 'Quality/TotalIqc', // 总数来料检
    'total_iqc_detail': 'Quality/TotalIqc/TotalIqcDetail', // 总数来料检详情
    'total_oqc': 'Quality/TotalOqc', // 总数出库检
    'total_oqc_detail': 'Quality/TotalOqc/TotalOqcDetail', // 总数出库检详情
    'total_fqc': 'Quality/TotalFqc', // 总数成品检
    'total_fqc_detail': 'Quality/TotalFqc/TotalFqcDetail', // 总数成品检详情

    // 仓库分组 (Warehouse/)
    'asn_body': 'Warehouse/AsnBody', // 待到货
    'asn_uninstall': 'Warehouse/AsnUninstall', // 确认到货
    'asn_pick': 'Warehouse/AsnPick', // 普通分拣
    'asn_pick_tray': 'Warehouse/AsnPickTray', // 分拣入盘
    'asn_in_store': 'Warehouse/AsnInStore', // 直接入库
    'asn_tray_in_store': 'Warehouse/AsnTrayInStore', // 托盘入库
    'product_in_store': 'Warehouse/ProductInStore', // 成品入库
    'asn_diff': 'Warehouse/AsnDiff', // 到货差异
    'srn_header': 'Warehouse/SrnHeader', // 待出货
    'srn_pick': 'Warehouse/SrnPick', // 待拣货
    'srn_deliver': 'Warehouse/SrnDeliver', // 待运输
    'srn_body': 'Warehouse/SrnBody', // 待发货
    'srn_sign': 'Warehouse/SrnSign', // 待签收
    'inventory': 'Warehouse/Inventory', // 盘点
    'move': 'Warehouse/Move', // 调拨
    'sn_pick_tray': 'Warehouse/SnPickTray', // 序列号分拣入盘
    'sn_in_store': 'Warehouse/SnInStore', // 序列号入库

    // 报工分组 (ReportWork/)
    'work_report': 'ReportWork/ReportWork', // 报工
    'use_material': 'ReportWork/Picking', // 领料
    'use_tools': 'ReportWork/LeadTooling', // 领用工装
    'use_knife': 'ReportWork/UseKnife', // 领用刀具
    'msg_center': 'ReportWork/MessageCenter', // 消息中心
    'work2': 'ReportWork/Work2', // 报工2
};

export const getRouteByAction = (action: string): string => {
    return ROUTE_MAP[action] || 'Detail';
}; 